package work;

// 金鱼类
public class Goldfish extends Fish {
    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getFinColor() {
        return finColor;
    }

    public void setFinColor(String finColor) {
        this.finColor = finColor;
    }

    private double weight;
    private String finColor;

    public Goldfish(String name, double weight, String finColor) {
        super(name);
        this.weight = weight;
        this.finColor = finColor;
    }

    @Override
    public void displayDetails() {
        super.displayDetails();
        System.out.println("重量：" + weight + "g");
        System.out.println("鳍颜色：" + finColor);
    }
}

